{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0206f096",
   "metadata": {},
   "source": [
    "### 使用文本编辑器"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "5fa11ac3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello,world!\n"
     ]
    }
   ],
   "source": [
    "print('hello,world!')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6d6b8b34",
   "metadata": {},
   "source": [
    "### Python代码运行助手"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ed6a2a82",
   "metadata": {},
   "source": [
    "### 输入输出"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "532b4369",
   "metadata": {},
   "source": [
    "print函数可以接受多个字符串，用逗号隔开，可以连成一串输出："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "972d8907",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The quick brown fox jumps over the lazy dog\n"
     ]
    }
   ],
   "source": [
    "print('The quick brown fox','jumps over', 'the lazy dog')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "da8e0ff9",
   "metadata": {},
   "source": [
    "遇到逗号会输出一个空格，print也能输出整数或者计算结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e9cedfd9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "300\n",
      "1200\n"
     ]
    }
   ],
   "source": [
    "print(300)\n",
    "print(100 + 1100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "44a74937",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Curry\n"
     ]
    }
   ],
   "source": [
    "name = input()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "fda1fc5a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Curry'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "cc0fbaed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, Curry\n"
     ]
    }
   ],
   "source": [
    "print(\"Hello,\",name)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "11e2b8a7",
   "metadata": {},
   "source": [
    "也可以在input函数中现实遗传字符串来提示用户，代码如下："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "1e39d4d4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "please enter your name: longlongshot\n",
      "Hello, longlongshot\n"
     ]
    }
   ],
   "source": [
    "name = input('please enter your name: ')\n",
    "print('Hello,',name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ec283862",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
